<%--
    Document   : indexReal
    Created on : 15-dic-2011, 3:21:52
    Author     : sixviv
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>+
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="/VirtualBook/css/style.css" rel="stylesheet" type="text/css" media="screen" />
        <title>Finalizado :: VirtualBook</title>
    </head>
    <body>
        <div id="header">
            
             <div id="menu">
             <ul>
             <li><a href="#"><strong>Institución</strong></a></li>
             <li><a href="view/institution/agregar_libro.jsp">Inicio</a></li>
             <li><a href="getInstBooksLists.action">Ver lista de Libros</a></li>
             <li ><a href="<s:url action="getInstBooksLists"  />" class="first">Lista Libros</a></li>
             <li ><a href="<s:url action="getPenInstBooksLists"  />" class="first">Solicitudes Pendientes Libros</a></li>
             <li ><a href="<s:url action="getSolInstBooksLists"  />" class="first">Solicitudes Libros</a></li>

             </ul>
        </div>
	<!-- end #menu -->
</div>
<!-- end #header -->
<!-- end #header-wrapper -->
<div id="logo">
	<h1><a>Virtual</a></h1>
	<p><em>Book</em></p>
</div>
<hr />
<!-- end #logo -->
<div id="page">
	<div id="content">
		<div id="content-bgtop">
                    <h1><s:text name="booksList"/></h1>
                    <div id="content-bgbtm">

        <s:if test="hasActionMessages()">
            <div class="welcome">
                <s:actionmessage/>
            </div>
        </s:if>
        <s:if test="(books.isEmpty())">
            <s:text name="emptyBooks"/>
        </s:if>
        <s:else>
            <table style="width:800px">
                <thead>
                <th><s:text name="book.name"/></th>
                <th><s:text name="book.author"/></th>
                <th><s:text name="book.editorial"/></th>
                <th><s:text name="actions"/></th>
                </thead>
                <tbody>
                    <s:iterator value="books">
                        <s:url action="verDetallesInstBooksLists" var="urlTag">
                            <s:param name="id" value="idbook"/>
                            <s:param name="type" value="status"/>
                        </s:url>
                        <s:url action="aprobarInstBooksLists" var="aprobarTag">
                            <s:param name="id" value="idbook"/>
                            <s:param name="type" value="status"/>
                        </s:url>
                        <s:url action="rechazarInstBooksLists" var="rechazarTag">
                            <s:param name="id" value="idbook"/>
                            <s:param name="type" value="status"/>
                        </s:url>
                        <tr>
                            <td><s:property value="name"/></td>
                            <td><s:property value="author"/></td>
                            <td><s:property value="editorial"/></td>
                            <td>
                                <s:a href="%{urlTag}"><s:text name="verDetalles"/></s:a>
                                
                                <s:url action="updateInsBooksEdit" var="linkUpdate">
                                    <s:param name="id" value="idbook"/>
                                </s:url>
                                <a href="${linkUpdate}">Editar</a>
                                <s:url action="deleteInsBooksEdit" var="linkDelete">
                                    <s:param name="id" value="idbook"/>
                                </s:url>
                                <a href="${linkDelete}" onclick="return confirm('¿Está seguro que desea eliminar?');">eliminar</a>
                            </td>
                            <s:if test="(pendientes==true || solicitados == true)">
                                <td><s:a href="%{aprobarTag}"><s:text name="aprobar"/></s:a></td>
                            </s:if>
                            <s:if test="(solicitados == true)">
                                <td><s:a href="%{rechazarTag}" onclick="return confirm('¿Esta seguro que desea rechazar la solicitud?')"><s:text name="Rechazar"/></s:a></td>
                            </s:if>
                        </tr>
                    </s:iterator>
                </tbody>
            </table>
        </s:else>
                    </div>
		</div>
	</div>
	<!-- end #content -->
	<div style="clear: both;">&nbsp;</div>
	<!-- end #page -->
	<div id="footer">

	</div>
	<!-- end #footer -->
</div>
    </body>
</html>

